<?php

require_once('AllTest.php');

$title = "Testar";
$test = new AllTest();
$testMessage = $test->Test();

?>

<!DOCTYPE HTML>

<html>
	
<head>
	<meta charset="UTF-8" />
	<title><?php echo $title; ?></title>
	<link rel=stylesheet href="style.css" type="text/css" >
</head>
<body>
<div id="wrapper">	
	<?php
	if (!isset($testMessage)){
		echo "<h2 class='green'>Testet lyckades!</h2>";
	}
	else {
		echo "<h2 class='red'>Testet misslyckades..</h2>";  
		foreach($testMessage as $key => $value){

			if(isset($value[0])){
				echo "<h3 class='red'>$key-testet misslyckades..</h3>";
			}
			else {
				echo "<h3 class='green'>$key-testet lyckades!</h3>";				
			}

			foreach($value as $message){
			echo "<p class='red'>$message</p>";
			}
		}		
	}
	?>
</div>
</body>	
	
	
</html>